CMSEditor
A world-class, LCARS-styled Markdown editor for the Valhalla CMS.
Supports drag-and-drop image embedding, instant preview, and seamless integration with the Media Library and MediaLink ACL system.
Features
- Visual Markdown Editing: Edit markdown with live preview.
- Drag-and-Drop Media Embedding: Drag images or files from the Media Library directly into the editor to auto-embed secure links.
- Quick Upload: Instantly upload and embed files.
- Content Metadata: Edit title, subtitle, author, release date, tags, and content type.
- Responsive Design: Works beautifully on all devices.
- LCARS Design: Styled to match the Valhalla LCARS dashboard.
Usage
- TypeScript
import CMSEditor from "@valkyr_labs_com/components/CMS/CMSEditor";
<CMSEditor
content={contentData}
isEditing={true}
onSave={handleSave}
onCancel={handleCancel}
/>
Props
| Name | Type | Description |
|---|---|---|
| content | ContentData | null | The content object to edit |
| isEditing | boolean | Whether the editor is in editing mode |
| onSave | (content: Partial<ContentData>) => void | Callback for saving content |
| onCancel | () => void | Callback for canceling edit |
Example
Screenshot coming soon. Use the live component story in the Component Library for an up-to-date preview.
Best Practices
- Use with the
CMSMediaLibraryfor drag-and-drop embedding. - Use the
CoolButtoncomponent for all actions. - Integrate with RTK Query and ThorAPI models for full type safety.